//
//  UILabel+Extension.swift
//  WeKe
//
//  Created by alyadan on 2017/11/23.
//  Copyright © 2017年 alyadan. All rights reserved.
//

import Foundation
import UIKit

public extension UILabel {
    
    func setContent(str: String?, lineSpacing: CGFloat = 10) {
        guard let content = str else {
           return
        }
        
        let style = NSMutableParagraphStyle()
        style.lineSpacing = lineSpacing
        
        self.attributedText = NSAttributedString(string: content, attributes: [NSAttributedString.Key.paragraphStyle: style])
    }
}
